import path from  'path';
import fs from  'fs'
import Root from  './Root.js'
export default  class  NodeRoot extends Root{

      load(dir){
          return new Promise(function (resolve, reject) {
              fs.readFile(path.resolve()+'/lib/'+dir+".jsr", function(err, data) {
                  if (err) {
                      reject(e);
                  } else {
                      //  console.log(data);
                      resolve(data);
                  }
              });
          });
    } 

}